<?php

namespace App\Http\Requests;


use App\Enums\PayMethod;

class OrderRequest extends FormRequest
{


    /**
     * Get the validation rules that apply to the request.
     *
     * @return array<string, mixed>
     */
    public function rules(): array
    {
        return [
            'id' => 'required|integer',
            'pay_method' => 'required|integer|in:' . join(',', array_keys(PayMethod::asSelectArray()))
        ];
    }
}
